package com.cskaoyan._14access._04usecase.factory;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/7 16:00
 **/
/*
工厂设计模式:
    一种创建对象的方式,只需要告诉我生产什么对象,生产对象的过程交给工厂去做
    不需要内部实现细节
 */
public class Demo {
    public static void main(String[] args) throws Exception {
        // Student student = new Student("zs", 20);
        Student student = StudentFactory.getInstance("com.cskaoyan._14access._04usecase.factory.Student",
                "zs", 20);

        System.out.println(student.name);
        System.out.println(student.age);

    }
}
